<?php
/**
 * Created by Yury Patrin.
 * Time: 26.11.13 18:15
 */

class Index extends CI_Controller
{
    public function __construct()
    {
        parent::__construct();
        $this->load->helper('url');
        $this->load->library('users');
    }

    public function index()
    {
        $session = $this->users->readUserSession();

        if (!$session)
            $this->load->view('index_page');
        else
            redirect('dashboard');
    }
}